package com.zch.rpc.client.controller;

import com.zch.rpc.client.fegin.HelloFegin;
import com.zch.rpc.core.annotation.RpcReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zch
 * @Date: 2019/1/10 20:07
 * @Description:
 */
@RestController
public class RestFulController {
    @RpcReference
    private HelloFegin helloFegin;
    /**
     * 基于restful 风格的rpc调用
     * @param name
     * @return
     */
    @GetMapping(value = "/restFulSay")
    public String say(String name){
        String result=helloFegin.say(name);
        return result;
    }
}
